package com.sqk.dxpro.dxsta;



import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.LongWritable;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;

import com.sqk.dxpro.utils.TProperties;

public class DxStaOneMapper extends Mapper<LongWritable,Text,Text,IntWritable>{

	@Override
	protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context)
			throws IOException, InterruptedException {
		
		
		String[] values = value.toString().split(TProperties.getValue("fileoutsplit"));
		Text k = new Text();
		IntWritable v = new IntWritable(1);
		k.set(values[0].substring(0,6)+"000000000000"+TProperties.getValue("outfilesplit")+values[1]);
		
		context.write(k,v);
	}
	
	
}
